Skip to content

Fix DOM XSS in a11y-snapshot-scanner fixSuggestion rendering - #807

Merged
praveenscience merged 1 commit into
praveenscience:mainfrom
devprashant19:fix-a11y-snapshot-scanner-xss
Jul 30, 2026
Merged

Fix DOM XSS in a11y-snapshot-scanner fixSuggestion rendering#807
praveenscience merged 1 commit into
praveenscience:mainfrom
devprashant19:fix-a11y-snapshot-scanner-xss

Conversation

@devprashant19

Copy link
Copy Markdown
Contributor

This PR fixes the DOM XSS vulnerability in tools/a11y-snapshot-scanner.html. Although most of the rendering logic used textContent, generating fix suggestions for unlabeled buttons injected the element's innerHTML unescaped into the finding description.

Fix: Added an escapeHtml() helper function and used it to sanitize the button's innerHTML when generating the remediation suggestion template.
Closes #801

@praveenscience
praveenscience merged commit 8f8ae75 into praveenscience:main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: DOM XSS via unescaped rule names in findings

2 participants